unit uMDZuma;

interface

uses
  SysUtils, Classes, WideStrings, DB, SqlExpr, FMTBcd, Provider,
  ADODB;

type
  Tmdzuma = class(TDataModule)
    AQryAcertaCliente: TADOQuery;
    AQryCadastro: TADOQuery;
    DsAQryCadastro: TDataSource;
    ADOConnection1: TADOConnection;
    AQryCadastroCLI_COD: TIntegerField;
    AQryCadastroCLI_FJ: TStringField;
    AQryCadastroCLI_NOM: TStringField;
    AQryCadastroCLI_FAN: TStringField;
    AQryCadastroCLI_END: TStringField;
    AQryCadastroCLI_BAI: TStringField;
    AQryCadastroCLI_MUN: TStringField;
    AQryCadastroCLI_UF: TStringField;
    AQryCadastroCLI_CEP: TStringField;
    AQryCadastroCLI_CGC: TStringField;
    AQryCadastroCLI_INS: TStringField;
    AQryCadastroCLI_GRA: TStringField;
    AQryCadastroCLI_ATR1: TIntegerField;
    AQryCadastroCLI_ATR2: TIntegerField;
    AQryCadastroCLI_PRA: TStringField;
    AQryCadastroCLI_PEND: TStringField;
    AQryCadastroCLI_PBAI: TStringField;
    AQryCadastroCLI_PMUN: TStringField;
    AQryCadastroCLI_PCEP: TStringField;
    AQryCadastroCLI_PUF: TStringField;
    AQryCadastroCLI_GRU: TStringField;
    AQryCadastroCLI_FON: TStringField;
    AQryCadastroCLI_CON: TStringField;
    AQryCadastroCLI_LOC: TIntegerField;
    AQryCadastroCLI_MAT: TIntegerField;
    AQryCadastroCLI_ATI: TStringField;
    AQryCadastroCLI_DTAA: TDateTimeField;
    AQryCadastroCLI_CODFUNC: TIntegerField;
    AQryCadastroCLI_OBS1: TStringField;
    AQryCadastroCLI_OBS2: TStringField;
    AQryCadastroCLI_OBS3: TStringField;
    AQryCadastroCLI_OBS4: TStringField;
    AQryCadastroCLI_OBS5: TStringField;
    AQryCadastroCLI_DTATU: TDateTimeField;
    AQryCadastroCLI_NEG: TBCDField;
    AQryCadastroCLI_LIM: TBCDField;
    AQryCadastroCLI_EMAIL: TStringField;
    AQryCadastroCLI_CCOND: TIntegerField;
    AQryCadastroCLI_PRAZO: TIntegerField;
    AQryCadastroCLI_BANCO: TIntegerField;
    AQryCadastroCLI_IDE: TStringField;
    AQryCadastroCLI_REF1: TStringField;
    AQryCadastroCLI_REF2: TStringField;
    AQryCadastroCLI_INDVEN: TIntegerField;
    AQryCadastroCLI_RAMATI: TIntegerField;
    AQryCadastroCLI_ENT_DESLOC: TStringField;
    AQryCadastroCLI_ENT_ESCADA: TStringField;
    AQryCadastroCLI_ENT_GARAGEM: TStringField;
    AQryCadastroCLI_ENT_ELEVADOR: TStringField;
    AQryCadastroCLI_ENT_PAVIMENTO: TIntegerField;
    AQryCadastroCLI_ENT_DISLOG: TIntegerField;
    AQryCadastroCLI_DTCAD: TDateTimeField;
    AQryCadastroCLI_CHAVECTB: TIntegerField;
    AQryCadastroCLI_HISTCTB: TIntegerField;
    AQryCadastroCLI_CENTRO_CUSTO: TIntegerField;
    AQryCadastroCLI_DTVALLIM: TDateTimeField;
    AQryCadastroCLI_EMAILCOB: TStringField;
    AQryCadastroCLI_SUBGRU: TStringField;
    AQryCadastroCLI_SEQENTREGA: TIntegerField;
    AQryCadastroCLI_INATIVADO: TStringField;
    AQryCadastroCLI_DTA_ATI: TDateTimeField;
    AQryCadastroCLI_DTA_INA: TDateTimeField;
    AQryCadastroCLI_CARTAO_FIDEL: TStringField;
    AQryCadastroCLI_DESCMAX: TBCDField;
    AQryCadastroCLI_SENHA_CARTAO_FID: TStringField;
    AQryCadastroCLI_VLRBASE_PONTUACAO: TBCDField;
    AQryCadastroCLI_SENHA_ACESSO: TStringField;
    AQryCadastroCLI_TIPO_CARTAO: TStringField;
    AQryCadastroCLI_CON_FINAL: TStringField;
    AQryCadastroCLI_PRI_TEL: TStringField;
    AQryCadastroCLI_SEG_CONT: TStringField;
    AQryCadastroCLI_SEG_EMAIL: TStringField;
    AQryCadastroCLI_SEG_TEL: TStringField;
    AQryCadastroCLI_TER_CONT: TStringField;
    AQryCadastroCLI_TER_EMAIL: TStringField;
    AQryCadastroCLI_TER_TEL: TStringField;
    AQryCadastroCLI_ROTA: TIntegerField;
    AQryCadastroCLI_MUNCOD: TIntegerField;
    AQryCadastroCLI_COD_INT: TAutoIncField;
    AQryCadastroCLI_SUFRAMA: TStringField;
    AQryCadastroCLI_PRECO_PADRAO: TStringField;
    AQryCadastroCLI_EMAILNFE: TStringField;
    AQryCadastroCLI_COMISSAOFUNC: TBCDField;
    AQryCadastroCLI_GNRE: TBCDField;
    AQryCadastroCLI_RG: TStringField;
    AQryCadastroCLI_NUMERO: TStringField;
    AQryCadastroCLI_COMPLEMENTO: TStringField;
    AQryCadastroCLI_PRI_DTNASC_CON: TDateTimeField;
    AQryCadastroCLI_SEG_DTNASC_CON: TDateTimeField;
    AQryCadastroCLI_TER_DTNASC_CON: TDateTimeField;
    AQryCadastroCLI_VRPRI: TBCDField;
    DsAQryAcertaCliente: TDataSource;
    AQRY: TADOQuery;
    AQryBD_FAC: TADOQuery;
    DsAQryBD_FAC: TDataSource;
    AQryMOVVEN: TADOQuery;
    DsAQryMOVVEN: TDataSource;
    AQryMOVEST: TADOQuery;
    DsQryMOVEST: TDataSource;
    AQryBD_ORC: TADOQuery;
    DsQryBD_ORC: TDataSource;
    AdoScript: TADOCommand;
    AQryScript: TADOQuery;
    procedure CdsChamadoAfterInsert(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  mdzuma: Tmdzuma;

implementation

{$R *.dfm}

procedure Tmdzuma.CdsChamadoAfterInsert(DataSet: TDataSet);
begin
dataset.FieldByName('AC_LOCAL').AsString:='4';
dataset.FieldByName('AC_DATA').AsDateTime:=Date();
dataset.FieldByName('AC_DATACAD').AsDateTime:= Date();
dataset.FieldByName('AC_DATAMOV').AsDateTime:= Date();
dataset.FieldByName('AC_VEND').AsString:= '0';
dataset.FieldByName('AC_ORCMTO').AsString := '0';
dataset.FieldByName('AC_RESP').AsString := '170';
dataset.FieldByName('AC_MOT').AsString := '0';
dataset.FieldByName('AC_SIT').AsString := 'A';
//dataset.FieldByName('AC_CONTATO').AsString :=


end;

end.
